window.onload=function(){
var hp = document.getElementById('hp');
var mp = document.getElementById('mp');
var sp = document.getElementById('sp');
var now = new Date();
var h= now.getHours();
var m = now.getMinutes();
var s = now.getSeconds();
h=h%12;
// 计算出现在距离上一个12点过了多少秒
var du = h*3600+m*60+s;
hp.style.animationDelay=-du+'s';
mp.style.animationDelay=-du+'s';
sp.style.animationDelay=-du+'s';
}
